# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

_author=AHICOX
_perlmod=Time-Interval
pkgname=perl-time-interval
pkgver=1.234
pkgrel=9
pkgdesc='Converts time intervals of days, hours, minutes, and seconds.'
arch=('any')
url='https://metacpan.org/pod/distribution/Time-Interval/Interval.pod'
license=('GPL' 'PerlArtistic')
depends=('perl')
options=(!emptydirs)
source=("http://search.cpan.org/CPAN/authors/id/A/AH/$_author/$_perlmod-$pkgver.tar.gz")
sha512sums=('0bd304e5ce3cd3e54fd2a0684ffa0525a7ca29d4ec243076a3113cfe61fde33314ae9e2496f73a25c30445970f22d3947945ec28760ef1544c73bfe2c6dd92e9')

prepare() {
  cd "$_perlmod-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
  cd "$_perlmod-$pkgver"

  make
}

package() {
  cd "$_perlmod-$pkgver"

  make DESTDIR="$pkgdir" install
}

